import { Hero } from "./Hero";
import { Akali } from "./Akali";
import { Olaf } from "./Olaf";
import { Corki } from "./Corki";

export class HeroFactory {
    static createHero(name: string): Hero {
        switch (name) {
            case "Akali":
                return new Akali();
            case "Olaf":
                return new Olaf();
            case "Corki":
                return new Corki();
            default:
                throw new Error("英雄不存在.");
        }
    }
}